﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Enter.BizLogic;
using Enter.Entity;
using Enter.Config;
using Enter.Common;

namespace Enter.Services.Mail
{
   public partial class Mail : IMail
    { 
       #region 商品类型
        public List<T105_GoodClassEntity> GetGoodClassList(string parentID)
        {
            T105_GoodClassBLLSub bll = new T105_GoodClassBLLSub();
            return bll.GetGoodClassList(parentID, EnumStatus.Valid );
        }
       
        /// <summary>
       /// 获取所有使用的商品类型
       /// </summary>
       /// <returns></returns>
        public List<T105_GoodClassEntity> GetAllGoodClassList()
        {
            T105_GoodClassBLLSub bll = new T105_GoodClassBLLSub();
            return bll.getValidList();
        }
       /// <summary>
       /// 获取类型对象
       /// </summary>
       /// <param name="cNo"></param>
       /// <returns></returns>
        public T105_GoodClassEntity GetCatebyNO(string cNo)
        {
            T105_GoodClassBLLSub bll = new T105_GoodClassBLLSub();
            return bll.GetObjectByNo(cNo);
        }
        /// <summary>
        /// 搜索二级商品类型
        /// </summary>
        /// <returns></returns>
        public List<T105_GoodClassEntity> GetCateSecondList(string parentID)
        {
            T105_GoodClassBLLSub bll = new T105_GoodClassBLLSub();
            return bll.GetCateSecondList(parentID);
        }
        /// <summary>
        /// 搜索最小一级商品类型
        /// </summary>
        /// <param name="parentID"></param>
        /// <returns></returns>
        public List<T105_GoodClassEntity> GetCateMinList(int num, string parentID)
        {
            T105_GoodClassBLLSub bll = new T105_GoodClassBLLSub();
            return bll.GetCateMinList(num, parentID);
        }

        public int UpdateClassHitCount(int classID)
        {
            T105_GoodClassBLLSub bll = new T105_GoodClassBLLSub();
            return bll.UpdateClassHitCount(classID);
        }
#endregion

        #region 属性
        /// <summary>
        /// 获取某属性下的值
        /// </summary>
        /// <returns></returns>
        public List<T116_GoodClassProperty_ValueEntity> GetPrpertyValue(string PNo)
        {
            T116_GoodClassProperty_ValueBLLSub bll = new T116_GoodClassProperty_ValueBLLSub();
           
            return bll.GetPrpertyValue(PNo);
             
          
        }
        /// <summary>
        /// 获取某类型下的属性
        /// </summary>
        /// <returns></returns>
        public List<T106_GoodClassPropertyEntity> GetClassPropertyList(string classID)
        {
            T106_GoodClassPropertyBLLSub bll = new T106_GoodClassPropertyBLLSub();
          
           return bll.GetClassPropertyList(classID,EnumStatus.Valid);
            
        }
       /// <summary>
        /// 获取库存属性
        /// </summary>
        /// <param name="cateNo"></param>
        /// <returns></returns>
        public List<T106_GoodClassStockPropertyEntity> GetStockProperty(string cateNo)
        {
            T106_GoodClassStockPropertyBLLSub bll = new T106_GoodClassStockPropertyBLLSub();
           return bll.GetStockProperty(cateNo);
        }
        #endregion

        #region 品牌
        /// <summary>
        /// 获取某类型下的品牌
        /// </summary>
        /// <param name="classID"></param>
        /// <returns></returns>
        public List<T109_GoodBrandEntity> GetGoodBrands(string classID)
        {
            T109_GoodBrandBLLSub bll = new T109_GoodBrandBLLSub();
            return (List<T109_GoodBrandEntity>)bll.GetGoodBrands(classID);
        }
        /// <summary>
        /// 获取某类型下的品牌
        /// </summary>
        /// <param name="classID"></param>
        /// <returns></returns>
        public IList<T109_GoodBrandEntity> GetGoodBrands(string classID, int count)
        {
            T109_GoodBrandBLLSub bll = new T109_GoodBrandBLLSub();
            return (List<T109_GoodBrandEntity>)bll.GetGoodBrands(classID, count);
        }
       
         /// <summary>
         /// 获取子类别下的品牌
         /// </summary>
         /// <param name="CateNO"></param>
         /// <returns></returns>
         public List<T109_GoodBrandEntity> GetGoodBrandbyCateNO(string CateNO)
         {
             T109_GoodBrandBLLSub bll = new T109_GoodBrandBLLSub();
             return bll.GetGoodBrandbyCateNO(CateNO,EnumStatus.Valid);
         }
         
       /// <summary>
       /// 首页品牌推荐
       /// </summary>
       /// <param name="count"></param>
       /// <returns></returns>
        public IList<T110_GoodBrandIndexEntity> GoodBrandIndex(int count)
        {
            T110_GoodBrandIndexBLLSub bll = new T110_GoodBrandIndexBLLSub();
            return (List<T110_GoodBrandIndexEntity>)bll.GoodBrandIndex(count);
        }
        #endregion
    }
}
